package com.xiaojie.mapper;

import com.xiaojie.entity.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @ClassName UserMapper
 * @Description TODO
 * @Author HTGY02
 * @Date 2021/4/28 10:29
 * @Version 1.0
 **/
public interface UserMapper {
    @Select("select * from sys_user where username=#{username} and  ")
    User selectByName(String userName);
    /* *
     * @Author yan
     * @Description 当重试次数超过3次之后，锁定用户账号
     * @Date 2021/4/28 10:55
     * @Param [username]
     * @return java.lang.Integer
     **/
    @Update("update sys_user set accountNonLocked=0,enabled=0 where username=#{username}")
    Integer updateTimes(String username);
}
